<!DOCTYPE html>
<html lang="en">
<head>
    <title>{$index.title}</title>
    <meta name="description" content="{$index.description}" />
    <meta name="keywords" content="{$index.keyword}" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta name="robots" content="all"/>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <!-- css -->
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link href="__MOBILE__css/iconfont.css" rel="stylesheet"/>
    <link href="__MOBILE__css/other/am.css" rel="stylesheet"/>
    <link href="__MOBILE__css/other/flexslider.css" rel="stylesheet"/>
    <link href="__MOBILE__css/other/style.css" rel="stylesheet"/>
    <!-- moblie -->
    <link rel="stylesheet" href="__MOBILE__css/style.css">
    {$seo.head}
</head>
<body>
{$seo.body}


<div class="m_wrap">
    {include file="public/header" /}

    <!-- m_banner -->
    <div class="m_banner">
        <ul class="m_banner_slider clear">
            {volist name="banner" id="v" key="k"}
            <li>
                <div class="pic">
                    <img src="{$v.img_url}" alt="{$v.alt}">
                </div>
            </li>
            {/volist}
        </ul>
    </div>
    <!-- m_banner end -->

</div>

<div class="_page _samples">
    <div class="_choose clear">
        <h3 class="fl">全部</h3>
        <i class="iconfont icon-zhankai _zhankai fr"></i>
        <div class="pulldown_menu clear">
            <span class="fl active type" data-id="0">全部</span>
            {volist name="type" id="v" key="k"}
            {if $v.id neq 22}
            <span class="fl type"  data-id="{$v.id}">{$v.name}</span>
            {/if}
            {/volist}
        </div>
    </div>
    <div class="videos_list _samples_list _bolg_list">
        <ul id="list">
            {volist name="list" id="v" key="k"}
            <li>
                <a href="/news/{$v.id}.html">
                    <div class="pic">
                        <img src="{$v.img_url}" alt="{$v.alt}">
                    </div>
                    <div class="text">
                        <h3 class="_title _title2">{$v.name}</h3>
                        <p class="_content _content2">{$v.intro}</p>
                        <div class="date clear">
                            <p class="fl">{$v.create_time}</p>
                            <p class="fl">by<span>{$v.author}</span></p>
                        </div>
                        <span class="_more">更多细节 >></span>
                    </div>
                </a>
            </li>
            {/volist}
        </ul>
    </div>

</div>
{include file="public/footer" /}
<script>
    $('.pulldown_menu span').click(function() {
        $(this).addClass('active').siblings().removeClass("active");
        console.log(111);
        var type = $(this).attr('data-id');
        $.ajax({
            type: "post",
            dataType: "json",
            url: '/mobile/news/getListBytype',
            data: {'type':type},
            success: function (res) {
                var success = JSON.parse(res);
                if(success.code===200){
                    console.log(success.data);
                    var html = '';
                    $.each(success.data,function(index,value) {
                        var da = '<li>\n' +
                            '                <a href="/news/'+value.id+'.html">\n' +
                            '                    <div class="pic">\n' +
                            '                        <img src="'+value.img_url+'" alt="'+value.alt+'">\n' +
                            '                    </div>\n' +
                            '                    <div class="text">\n' +
                            '                        <h3 class="_title _title2">'+value.name+'</h3>\n' +
                            '                        <p class="_content _content2">'+value.intro+'</p>\n' +
                            '                        <div class="date clear">\n' +
                            '                            <p class="fl">'+value.create_time+'</p>\n' +
                            '                            <p class="fl">by<span>'+value.author+'</span></p>\n' +
                            '                        </div>\n' +
                            '                        <span class="_more">More Details >></span>\n' +
                            '                    </div>\n' +
                            '                </a>\n' +
                            '            </li>';
                        html+=da;
                    });
                    $('#list').html(html);
                }else {

                }

            }
        });
    });
    $('._choose').click(function() {
        $('.pulldown_menu').toggle(300);
    });

    $('._title2').wordLimit(90);
    $('._content').wordLimit(110);


</script>